<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li ><a href="{:url('Video/index',array('isdel'=>0,'status'=>1,'is_draft'=>0))}">视频列表</a></li>
			<li class="active"><a >{:lang('ADD')}</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('Video/addPost')}">
            
            <div class="form-group">
				<label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>分类</label>
				<div class="col-md-6 col-sm-10">
					<select class="form-control" name="classid">
                        <volist name="class" id="v">
                        <option value="{$v['id']}">{$v['name']}</option>
                        </volist>
                    </select>
				</div>
			</div>
            
            <div class="form-group">
				<label for="input-uid" class="col-sm-2 control-label"><span class="form-required">*</span>用户ID</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-uid" name="uid">
				</div>
			</div>
            
            <div class="form-group">
				<label for="input-title" class="col-sm-2 control-label"><span class="form-required">*</span>标题</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-title" name="title">
				</div>
			</div>
            
            <div class="form-group">
				<label for="input-user_login" class="col-sm-2 control-label"><span class="form-required">*</span>图片</label>
				<div class="col-md-6 col-sm-10">
					<input type="hidden" name="thumb" id="thumbnail" value="">
                    <a href="javascript:uploadOneImage('图片上传','#thumbnail');">
                        <img src="__TMPL__/public/assets/images/default-thumbnail.png"
                                 id="thumbnail-preview"
                                 style="cursor: pointer;max-width:100px;max-height:100px;"/>
                    </a>
                    <input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
				</div>
			</div>
            
            <div class="form-group">
				<label for="input-href" class="col-sm-2 control-label"><span class="form-required">*</span>上传视频</label>
				<div class="col-md-6 col-sm-10">
					<input class="form-control" id="js-file-input" type="text" name="href" style="width: 300px;display: inline-block;" title="视频文件地址" >

                    <a href="javascript:uploadOne('文件上传','#js-file-input','video');">上传文件</a>MP4格式
                   	<p class="help-block">可填写视频链接 [只能包含字母,数字,下划线,不能包含*#$等特殊字符]，可直接上传视频获取链接</p> 
				</div>
				
			</div>
            
            <div class="form-group">
				<label for="input-href_w" class="col-sm-2 control-label"><span class="form-required">*</span>上传水印视频</label>
				<div class="col-md-6 col-sm-10">
					<input class="form-control" id="js-file-input2" type="text" name="href_w" style="width: 300px;display: inline-block;" title="水印视频文件地址">
                    <a href="javascript:uploadOne('文件上传','#js-file-input2','video');">上传文件</a>MP4格式
                    <p class="help-block">可填写视频链接 [只能包含字母,数字,下划线,不能包含*#$等特殊字符]，可直接上传视频获取链接</p> 
				</div>
			</div>
            
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
                    <input type="hidden" name="status" value="1">
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
					<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
				</div>
			</div>
            
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
    <script>
        (function(){
            $('.btn-cancel-thumbnail').click(function () {
                $('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
                $('#thumbnail').val('');
            });
            
            
        })()
    </script>
</body>
</html>
